package com.zwc.factory;

public class Test {
    public static AbstractFactory createFactory(String choose){
        AbstractFactory abstractFactory = null;
        if (choose.equals("YuanXing")){
            abstractFactory = new YuanXingFactory();
        }else if(choose.equals("ZhengFangXing")){
            abstractFactory = new ZhengFangXingFactory();
        }
        return abstractFactory;
    }
    public static void main(String[] args) {
        Integer area = createFactory("YuanXing").createTuxing(3).calculate();
        System.out.println(area);
    }
}
